package com.itheima.operator;

import java.util.Scanner;

/**
 * @ClassName Test
 * @Author 16799
 * @Date 2025/5/10 18:50
 * @Version 1.0
 * @Description TODO
 **/
public class Test {
    public static void main(String[] args) {

        int i = 10;
        int j = 45;
        int k = 34;
        int max = (i > j ? (i > k ? i : k) : (j > k ? j : k));
        //System.out.println("最大数是：" + (i > j ? (i > k ? i : k) : (j > k ? j : k)));
        System.out.println("max="+ max);




        Scanner sc = new Scanner(System.in);
        System.out.println("输入第一个数：");
        int a = sc.nextInt();
        System.out.println("输入第二个数：");
        int b = sc.nextInt();
        System.out.println("输入第三个数：");
        int c = sc.nextInt();
        System.out.println("最大数是：" + (a > b ? (a > c ? a : c) : (b > c ? b : c)));


    }
}